<?php
/**
 * --------------------------------------------------
 * Copyright © 2018 PHP游戏项目学习交流群：820621745 版权所有
 *
 * 功能描述：
 *
 * 创建标识：Created by Zyc On 2018/8/14 10:45
 *
 * 修改标识：
 * 修改描述：
 *---------------------------------------------------
 */

class Status
{
    static $StatusOK            = 1000;
    static $StatusDataNull      = 1001;

    static $StatusError         = 3000;
    static $ParmIsNull          = 3001;
    static $TokenIsNull         = 3002;
    static $TokenIsError        = 3003;
    static $SysParmIsError      = 3004;
    static $TimeIsError         = 3005;
    static $PasswordIsError     = 3006;
    static $CcontentIsError     = 3007;
    static $MoneyIsError        = 3008;
    static $OntAgentAccess      = 3009;
    static $UserError           = 4001;
    static $KeyIsError          = 4002;
    static $NotAccess           = 4003;
    static $MoneyError          = 4008;
    static $MoneyDont100        = 4009;
    static $ParmIsError         = 5001;
    static $SignIsError         = 5002;
    static $PayIsError          = 5003;
    static $PayError            = 5004;

    static $GAME_USERID_NULL    = 7001;
    static $GAME_GOODS_NUM_ERR  = 7002;
    static $GAME_USER_ERR       = 7003;
    static $GAME_GOODS_ERR      = 7004;
    static $MOBILE_TIME_ERR     = 7005;
    static $GAME_MOBEY_ERR      = 7006;
    static $MONEY_DONT_200      = 7007;
    static $GAME_IS_STOP        = 7008;

    static $messagArray=[
        1000=>'成功',
        1001=>'数据为空',
        3000=>'失败',
        3001=>'缺少参数',
        3002=>'缺少token',
        3003=>'错误的token',
        3004=>'必须参数为空',
        3005=>'请求超时',
        3006=>'密码有误',
        3007=>'数据重复',
        3008=>'部门经费不足',
        3009=>'代理没有登录权限',
        4001=>'用户不存在',
        4002=>'加密KEY有误',
        4003=>'没有操作权限',
        4008=>'余额不足',
        4009=>'提现金额少于100',
        5001=>'参数有误',
        5002=>'签名错误',
        5003=>'支付接口错误',
        5004=>'支付金额小于10元',
        7001=>'用户user_id为空',
        7002=>'商品数量于1',
        7003=>'代理已经注册过了',
        7004=>'商品不存在',
        7005=>'短信验证码已超时',
        7006=>'钻石不足',
        7007=>'提现金额不足200',
        7008=>'功能暂未开放。',
    ];

    /**
     * @param $CODE
     * @param null $DATA
     * @return string
     */
    static public function returnMessage($CODE,$DATA=null){
        $DATAS['code']=$CODE;
        $DATAS['massage']=self::$messagArray[$CODE];
        $DATAS['data']=$DATA;
        return $DATAS;
    }
}